package com.easou.ps.dk.services;

import java.util.ArrayList;
import java.util.List;

import com.easou.ps.dk.domain.ABaiduResult;
import com.easou.ps.dk.domain.BaiduResult;
import com.easou.ps.dk.domain.QueryInfo;
import com.easou.ps.dk.domain.QueryParams;
import com.easou.ps.dk.domain.ResultInfo;

/**
 * 
 * @author dirk
 *
 */
public class Comparer {

	/**
	 * 比较某两天的结果
	 * 返回结果不同的词list
	 * @param qpSomeDay
	 * @param qpSomeDay2
	 * @return
	 */
	public static List<String> todo(QueryParams qpSomeDay, String yestedayQp){
		List<String> diffWords = new ArrayList<String>();
		
		return diffWords;
	}
	
	/**
	 * 
	 * @return
	 */
//	public static void todo(QueryParams qp, BaiduResult baiduResult){
//		List<QueryInfo> queryInfos = qp.getQueryInfos();
//		int count = 0;
//		for (int i = 0; i < queryInfos.size(); i++) {
//			QueryInfo queryInfo = queryInfos.get(i);
//			String query = queryInfo.getQuery();
//			ABaiduResult aBaiduResult = baiduResult.getResults().get(query);
//			List<String> hited = new ArrayList<String>();
//			List<ResultInfo> resultInfos = queryInfo.getResultInfos();
//			for (int j = 0; j < resultInfos.size(); j++) {
//				ResultInfo resultInfo = resultInfos.get(j);
//				String originalUrl = resultInfo.getOriginalUrl();
//				hited.add(j+"_"+ aBaiduResult.FindNoByUrl(originalUrl));
//				if(aBaiduResult.FindNoByUrl(originalUrl)>=0){
//					count++;
//				}
//			}
//			System.out.println(query+":"+hited);
//		}
//		System.out.println("catch baidu results count: "+count);
//	}
}
